package com.cy.pj.sys.dao;

import com.cy.pj.common.vo.Node;
import com.cy.pj.sys.entity.SysMenu;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author LiuXu
 * @create 2020-07-16 17:29
 */
@Mapper
public interface SysMenuDao {
    List<SysMenu> findObjects();

    //基于菜单id查询子菜单id
    int getChildCount(Integer id);

    //基于菜单id删除菜单记录
    int deleteObject(Integer id);

    //查询上级菜单相关信息
    List<Node> findZtreeMenuNodes();

    //数据持久化
    int insertObject(SysMenu entity);

    //数据更新
    int updateObjext(SysMenu entity);
}
